<?php
/**
 * =============================================================================
 * Class: Tv_Arte_View
 * Last mod: 21/09/2011 14:40:37
 *
 * Vue de base
 */
class Tv_Arte_View
{
	/**
	 * @var Array
	 */
	private $_vars = Array();
	/**
	 * @param   String $key
	 * @param   String $value
	 * @return  void
	 */
	public function __set($key, $value)
	{
		$this->assign($key, $value);
	}
	/**
	 * @param   String $key
	 * @return  void
	 */
	public function __get($key)
	{
	    return $this->_vars[$key];
	}
 	/**
	 * @param   String $key
	 * @param   String $value
	 * @return  Tv_Arte_View
	 */
	public function assign($key, $value) {
	    $this->_vars[$key] = $value;
	    return $this;
	}
	public function render($name)
	{
		ob_start();
      	include($name);
		return ob_get_clean();
	}
}